<?php

declare(strict_types=1);
/**
 * 创建人 : Forpastime
 *
 * @link     http://hypercmf.com
 * @document https://hyperf.wiki
 * @contact  forpastime@qq.com
 * @git  https://gitee.com/hypercmf/hypercmf1.0.git
 */
namespace App\Controller\Install;

use App\Controller\AdminBaseController;
use App\Utils\Result;
use Hyperf\HttpServer\Contract\RequestInterface;
use Hyperf\HttpServer\Contract\ResponseInterface;

class IndexController extends AdminBaseController
{
    public function index(RequestInterface $request, ResponseInterface $response)
    {
        if(file_exists(BASE_PATH.'install.lock')){
            return Result::error('系统已安装！');
        }
        return $this->fetch();
    }
}
